define(["jquery", "template", "bld/template/patient/treatPlan.tpl"], function($, template, tpl) {
    var ui = {};

    var drawInfo = function(data) {
        return template("tpl_treatPlan_info", data);
    }
    var drawGetPlanDetail = function(data) {
        return template("tpl_treatPlan_getPlanDetail", data);
    }
    var drawModifyStageName = function(data) {
        return template("tpl_treatPlan_modifyStageName", data);
    }
    var drawAddClassify = function(data) {
        return template("tpl_treatPlan_addClassify", data);
    }
    var drawQueryAllScheme = function(data) {
        return template("tpl_treatPlan_queryAllScheme", data);
    }
    var drawQueryAllCourse = function(data) {
        return template("tpl_treatPlan_queryAllCourse", data);
    }
    var drawAddStage = function(data) {
        return template("tpl_treatPlan_addStage", data);
    }
    
    var drawAllScheme = function(data) {
        return template("tpl_treatPlan_allScheme", data);
    }
    var drawAllCourse = function(data) {
        return template("tpl_treatPlan_allCourse", data);
    }

    ui.info = function(options) {
        $("#" + options.id).html(tpl.info());
        var h = drawInfo(options.info);
        $("#" + options.id).html(h);
    }
    ui.getPlanDetail = function(options) {
        $("#" + options.id).html(tpl.getPlanDetail());
        var h = drawGetPlanDetail(options);
        $("#" + options.id).html(h);
    }
    ui.modifyStageName = function(options) {
        options.dom.html(tpl.modifyStageName());
        var h = drawModifyStageName(options);
        options.dom.html(h);
    }
    ui.addClassify = function(options) {
        options.dom.html(tpl.addClassify());
        var h = drawAddClassify(options);
        options.dom.html(h);
    }
    ui.queryAllScheme = function(options) {
        $("#" + options.id).html(tpl.queryAllScheme());
        var h = drawQueryAllScheme(options);
        $("#" + options.id).html(h);
    }
    ui.queryAllCourse = function(options) {
        $("#" + options.id).html(tpl.queryAllCourse());
        var h = drawQueryAllCourse(options);
        $("#" + options.id).html(h);
    }
    ui.addStage = function(options) {
        options.dom.html(tpl.addStage());
        var h = drawAddStage(options);
        options.dom.html(h);
    }

    ui.allScheme = function(options) {
        $("#" + options.id).html(tpl.allScheme());
        var h = drawAllScheme(options);
        $("#" + options.id).html(h);
    }
    ui.allCourse = function(options) {
        $("#" + options.id).html(tpl.allCourse());
        var h = drawAllCourse(options);
        $("#" + options.id).html(h);
    }

    return ui;
});